package net.simflow.swf.analyzer.graph.stats.data;

import java.util.ArrayList;
import java.util.TreeMap;

import net.simflow.swf.analyzer.network.data.Link;
import net.simflow.swf.analyzer.network.data.Node;
import edu.uci.ics.jung.graph.Graph;

public class GraphStats {

	public final static String GRAPH_NAME = "Graph Name";
	public final static String VERTEX_NUMBER = "Vertex Number";
	public final static String EDGE_NUMBER = "Edge Number";
	public final static String VERTICES = "Vertices";
	public final static String EDGES = "Edges";
	public final static String DEGREE_DISTRIBUTION = "Degree Distribution";

	private Graph<Node, Link> graph;
	private String graphName;
	private ArrayList<Node> nodeArray;
	private ArrayList<Link> linkArray;
	private TreeMap<Integer, ArrayList<Node>> degreeDistribution;

	public Graph<Node, Link> getGraph() {
		return graph;
	}

	public void setGraph(Graph<Node, Link> graph) {
		this.graph = graph;
	}

	public String getGraphName() {
		return graphName;
	}

	public void setGraphName(String name) {
		this.graphName = name;
	}

	public int getNodeCount() {
		if (nodeArray == null) {
			return -1;
		}
		return nodeArray.size();
	}

	public int getLinkCount() {
		if (linkArray == null) {
			return -1;
		}
		return linkArray.size();
	}

	public ArrayList<Node> getNodeArray() {
		return nodeArray;
	}

	public void setNodeArray(ArrayList<Node> nodeArray) {
		this.nodeArray = nodeArray;
	}

	public ArrayList<Link> getLinkArray() {
		return linkArray;
	}

	public void setLinkArray(ArrayList<Link> linkArray) {
		this.linkArray = linkArray;
	}

	public TreeMap<Integer, ArrayList<Node>> getDegreeDistribution() {
		return degreeDistribution;
	}

	public void setDegreeDistribution(
			TreeMap<Integer, ArrayList<Node>> degreeDistribution) {
		this.degreeDistribution = degreeDistribution;
	}
}
